<script setup>
  import { initRouterUtil } from "@/utils/RouterUtil.js";

  const RouterUtil = initRouterUtil();

  const go_assign_tool = () => {
    RouterUtil.replace('/tools/excel');
  }
</script>

<template>
  <div class="tools-basic">

    <div class="tools-header-basic">
      <div class="tools-header-left">
        <span>开发工具导航页</span>
      </div>
    </div>

    <div class="tools-list-basic">
      <div class="tools-list-item">
        <div class="tools-list-item-body">json 格式化工具</div>
        <div class="tools-list-item-title">JSON 格式化</div>
      </div>
      <div class="tools-list-item">
        <div class="tools-list-item-body" @click="go_assign_tool">excel 文件转换</div>
        <div class="tools-list-item-title">Excel 转换</div>
      </div>
    </div>
  </div>
</template>

<style scoped>
  .tools-basic {
    width: 100vw;
    height: 100vh;
  }

  .tools-header-basic {
    width: calc(100% - 84px);
    height: 76px;
    padding: 0 42px;
    box-shadow: 0 0 15px 5px rgba(58, 58, 58, .1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
  }

  .tools-header-left {
    width: 200px;
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 1.2em;
  }

  .tools-list-basic {
    width: calc(100vw - 104px);
    height: calc(100vh - 76px - 36px);
    padding: 36px 52px 0 52px;
    background-color: rgba(238, 238, 238);
  }

  .tools-list-item {
    width: 260px;
    padding: 5px;
    height: 170px;
    margin: 12px 16px;
    float: left;
    overflow: hidden;
    background-color: white;
    position: relative;
    top: 0;
    transition: all .3s;
  }
  .tools-list-item:hover {
    cursor: pointer;
    box-shadow: 0 0 15px 5px rgba(0, 0, 0, .1);
    top: -5px;
  }
  .tools-list-item-body {
    width: 260px;
    height: 140px;
    background-color: #33bea9;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
  }
  .tools-list-item-title {
    width: 240px;
    height: 30px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
  }
</style>